package com.gate.server;

import com.base.wslisten.BaseClientSession;
import com.base.wslisten.BaseRepeater;
import com.game.conn.GameConn;
import com.google.gson.Gson;
import com.msg.ClientMsgID;
import com.msg.Message;

public class GateRepeater extends BaseRepeater {
	GameConn gameConn = new GameConn("127.0.0.1", 1011);
	public void sendMsg(BaseClientSession clientSession) {
		Message msgToGame = new Message(clientSession.getUuidLong(),clientSession.getTextWebSocketFrame().text(),ClientMsgID.chat);
		Gson gson = new Gson();
		String jsonStr = gson.toJson(msgToGame, Message.class);
		gameConn.SendMsg(jsonStr);
	}
}
